create a Timestamp object in angularfire app
up vote
1
down vote
favorite
First tried
import { Timestamp } from '@firebase/firestore-types';
and then how to create a Timestamp object?
var now: Timestamp = ???
var now: Timestamp = Timestamp.now() //Module not found: Error: Can't resolve '@firebase/firestore-types'
angular firebase timestamp angularfire2
add a comment |
up vote
1
down vote
favorite
First tried
import { Timestamp } from '@firebase/firestore-types';
and then how to create a Timestamp object?
var now: Timestamp = ???
var now: Timestamp = Timestamp.now() //Module not found: Error: Can't resolve '@firebase/firestore-types'
angular firebase timestamp angularfire2
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
First tried
import { Timestamp } from '@firebase/firestore-types';
and then how to create a Timestamp object?
var now: Timestamp = ???
var now: Timestamp = Timestamp.now() //Module not found: Error: Can't resolve '@firebase/firestore-types'
angular firebase timestamp angularfire2
First tried
import { Timestamp } from '@firebase/firestore-types';
and then how to create a Timestamp object?
var now: Timestamp = ???
var now: Timestamp = Timestamp.now() //Module not found: Error: Can't resolve '@firebase/firestore-types'
angular firebase timestamp angularfire2
angular firebase timestamp angularfire2
edited Jul 22 at 20:33
asked Jul 22 at 3:59
Anh Nguyễn Tuấn
163
163
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
import { Timestamp } from '@firebase/firestore-types';
Here Timestamp is just a type, if you want to get the current time just use
var now = new Date(;
add a comment |
up vote
0
down vote
JS Date objects do get saved as timestamps in Firestore/firebase:
ref.update({ updatedAt: new Date() })
// results in timestamp in Firestore
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
import { Timestamp } from '@firebase/firestore-types';
Here Timestamp is just a type, if you want to get the current time just use
var now = new Date(;
add a comment |
up vote
1
down vote
import { Timestamp } from '@firebase/firestore-types';
Here Timestamp is just a type, if you want to get the current time just use
var now = new Date(;
add a comment |
up vote
1
down vote
up vote
1
down vote
import { Timestamp } from '@firebase/firestore-types';
Here Timestamp is just a type, if you want to get the current time just use
var now = new Date(;
import { Timestamp } from '@firebase/firestore-types';
Here Timestamp is just a type, if you want to get the current time just use
var now = new Date(;
answered Jul 22 at 4:03
Sajeetharan
113k27154211
113k27154211
add a comment |
add a comment |
up vote
0
down vote
JS Date objects do get saved as timestamps in Firestore/firebase:
ref.update({ updatedAt: new Date() })
// results in timestamp in Firestore
add a comment |
up vote
0
down vote
JS Date objects do get saved as timestamps in Firestore/firebase:
ref.update({ updatedAt: new Date() })
// results in timestamp in Firestore
add a comment |
up vote
0
down vote
up vote
0
down vote
JS Date objects do get saved as timestamps in Firestore/firebase:
ref.update({ updatedAt: new Date() })
// results in timestamp in Firestore
JS Date objects do get saved as timestamps in Firestore/firebase:
ref.update({ updatedAt: new Date() })
// results in timestamp in Firestore
answered yesterday
Govind Samrow
4,798102852
4,798102852
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51461918%2fcreate-a-timestamp-object-in-angularfire-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown